//
//  Dictionary.swift
//
//  Created by 李加建 on 2021/9/29
//

import Foundation

public extension Dictionary {
    func toJSONString() -> String? {
        guard let data = try? JSONSerialization.data(withJSONObject: self, options: .fragmentsAllowed) else { return nil }
        return String(data: data, encoding: .utf8)
    }
}
